added update and render methods