gallery functions about 1/2 completed