implemented gallery widget