Fixes #22

Passes tests