allowing both clipping and trimming