finished refactoring of code, still need to complete refactoring of test