implements word_alignment