modifications to run with pypy
also changes to evaluation code