updated unit tests based on refactor