trimming template