gallery code changed