added percentage and image index for "each" function call