changes to the command listener to make it configurable