added CLI, fixes #6