further update to work on command line