change the class constructor by new Function instead of eval