import from mikeumus https://github.com/bevry/gostatic/issues/1#issuecomment-24488551
sort faster
rewrite