getNode method public and return node