-major revision
-event system added