created find_contacts method and find_pattern method