function to search list by name