added classify function