working cropping and scaling