Working cacheMatrix script, version 1.0