add update support; add tests