um delete function and refactor controller 70%