closes #181
better debugging for #179