finished with implementation -- refactoring and more tests needed