modified the command line app to work with Tom's latest changes.