implemented cache matrix function and cache solving function