fix failing tests
fix example code. Fixes #13