implements node class