master First draft of functions for cached matrix inversion