move update code into command controller