simplified cropping, much more robust now