adds class type to node