Refactored genie apearing hack