First attempt to implement the feature request in issue #5