added async event support
added new tests.