Add update

Used several arities to make it GC-friendly.
Merge pull request #21 from fredericksgary/master

Add update