add better view handling