need to refactor these tests