refactoring tests, still need to unit test them because of rspec of plane mistake