fast sequence trimming