Implementing issue #24