replace define to parameterized class