add gallery code