fixed #67, tests updated