fix classification functions