Possibly implemented the update function.

Untested.