more refactoring on receiver.rb