added unittests for search functions