Issue 44

fixes #44 and #47