seperating and trimming