added gallery code