adding function setImage