Added cropping code