build writes and reads