implemented change from PR #40