draft version; added test cases; short of benchmarks and comments