implemented low batery warning