starting matrix implementation