searchNode function added