#3 unit tests, refactor - model