Added cutting logic