chacheMatrix implemented