Added classify function.