Added solution for cutting.