adding trimming option