minor refactoring of views