even better trimming, v0.1.8