added guard and rspec