refactored rspec.