implemented issue #23