finally implemented command line interface