render the correct view