trimming the edges