rewrote internal engine, no longer uses eval, fixed issue with mda_exists and null values