added CLI-mode for automated testing