replaced evals with something less hackish and more robust
fixed merge issue