fixed write arithmetic