second commit add appendimages function