adds cropping functionality