command line implementation