implemented a resize function. to size down the large images. still needs to be tested and used in the main view