initial implementation on cachematrix and inverse function