cleaned up action.rb