Added charging functionality.