set up view events