adding start of energy function