fixed naiveg and implemented evaluation