add render view function