added in new layered cut function