Converted to command line tool