refactored eval_compile*