implemented basic node class