Suggested implementation for issue #2