chage the part of generating imags for display randomly