add basic event functionality