For Comp 225: example of unit testing & refactoring