separated rspec methods from implementation