added basic event functionality