add function for search device