moved evaluation code