started working on block diagonal matrix