implemented issue #21