Modified order of prev_word database retrieval in construct_sentence