added remaining time to battery function