factorized the catAge variable