Renamed currentNode to node
Refactored code cause Contains() and Find() are very similar