remove unnecessary code from category