adding new helper methods and rspec tests