modified classify routines