unit tests for class matrix enhanced
gain block improved, unit tests added