fixed implementation of nodes