code trimming