adding listImages function