add render method for view