implemented csv matrix reader