updated tests for refactor