add sample function for displaying image