completed integer write implementation