added a trim to many replaces functions