According to the BCS model, the probability vk2 of filling electronic states as a function of kinetic energy is smeared out. A modified mechanism for formation of vk2 that includes fluctuations near quantum phase transitions is proposed. The superconducting gap Δ for materials with parameters close to those of HTSC materials is estimated when fluctuations are present and the result is comparable to actual observations. The major characteristics of the proposed model resemble those of the model used to describe HTSC materials.