issue #1. slightly improved
(only the test code) Merge branch 'master' into original-with-test