fixed logic error for completeSentence