update trim length