refactored events create action