refactor controller with create vs update