wrote categories/subcats parsing function for get-constants