repared write_int16