Add read_rpc function to decorrelate read and write function