added a bit broken command line version