import Jimmy's version from stat

please review and pull :-)