refactored code
passed level 9 with a clean code base