added multiple-image support