moved update code out of components