add read matrix method for new r-square computation