fixes #36 and closes #35