new version, with Pathname fix

thank you @pablom for the contribution!