fix 'new'/'inherit' definition as a function