complete adjacent words function
complete adjacent words function