modified metarw#read