create method for search by name