refactoring for adding class
add klass member function definition
(not yet callable)