initialization of singly and doubly node classes