implemented command line interface and tested functions