add tests for revision
fix update implementation