4.2.2 read-write solution