adding a render loop