added helper methods to actions.rb file