Added Math.ceil() to charge functions