changed Node struct to a class