Level 9 refactored