setting up update and render