my edits making working cachematrix functions