change read_data so that there is option to read general matrices
demean