added constructor to get event state