added iterators to the matrix class and tests