add new method replaceclass