Rewrite evaluation code