fixes #67, tests passed