Enhancement for both functions -> adding checking if matrix changed ('set' was used, and different matrix was stored in our object)  Helper function for checking matrices equality added.