wrote code for cachematrix
fixed spacing