refactored the fuck out of the levelup method