Adding passing test code for 9
Performed first refactoring