refactor rspec stuff