Implementing issue #23

Issue #23