and now add the view handling as well