Adding in the bands energy function.