solution cachematrix assignment

complete