cat id logic changed