added a function to image model