added findnode function