big refactoring - a new way (using ValuesProvider) is added to provide matrices for the calculation.