implements issue #38