added field num_plays in XImage to avoid redundant images