cacheSolve implemented and tested