generic view implementation