return new function instead of eval