add a test and example to pull request #116