replaced eval function