add update and render to main loop