fix: issue #17 + improvement of #10