added command line api