update combineimages func