script for cat/subcat