add writeLong and writeInt