initial attempt at code
adding documentation to function
cache matrix