introducing resize image function