added code to configure the command listener