added function to remove energy from a player