updated evaluation function and some other stuff