modified rps.rb