Reformat write_word()

also make input parameter constant