added a function to display image also added IO class: