impl edit mode for category and cancel button