First implementation for issue #7