refactor set-up view