added basic event listener to command line