more work on view functions