Added energy functions and used them in act and .drainEnergy