prob1 answer and rspec test