updating class tree method