modified eval function in Eval.hs