added image loading functionality