Implementation for issue #12