refactoring related to issue #19