Quantisation of energy levels