Change the searchInstance function for a more precise version.
Adding unit test for searchInstance element.