implement dot-matrix