added "add event" logic and sample views