update drawNode method