predict classes function added