more refactoring, restructure rspec