changed node.cpp froms struct to class