changed how update is first called, using domReady instead