optimizing charging times