update has a bug but otherwise it's working nicely