Updated programming assingment 2, checks if matrix is square