add test code of event emit & subscribe. Code may be refactored later to use these.