Changed the charge method into a classmethod