adding imageViewer function