first attempt to implement events