implements issue #2