adds events and views