add contains function use to getNodes