Closes #37 with a test case