new method: read matrix