changed gallery to dynamically insert images