Added code for rendering view