refactory View.renderView