connecting the view logic