simplify #2 and add a test
0.4.0