read before write