changed q to cat in categories