category editing function