take over changes from PR #15