added battery life functions and added to update functions