scanner checks res_word an changes triple accordingly