refactoring empty 99 puzzle