implemeted evaluate func