handle class and method definitions