Michael: fixed evaluation function, need to test more