implement issue #20