updated api for classify, added comments