added event support (#3)