make categories nested form