implementing battery consumption