removed unused trimming functions