added image viewing code framework