Added listener code as well as Logger

naming convention. function name should be in pascal case