implementation of rspec for testing