added MatrixCreator
calculate day index for matrix has still minor flaws