refactor view to simplify exceptions