add curl invocation script
more work on tests, bugfixes