fixes #65
unit testing for #65 and #66