refactored rspec a bit