Refactored code to create level 3.