Adds update function
Merge pull request #2 from henryh28/update

Adds update function