refactored the update method in the tickets controller
refactored the update method in the tickets controller