modified process_action to return the event