added simple event functionality