merging changes from PR #45