added code to scale pictures taken