tests and trimming feature