added CLI functionality