cleaned up event.rb code duplicates