not using matrix