implemented tests via rspec