added image display code.