Updated version of add and Node class