implemented issue #145