add script for command line use