Finished rewriting evaluate