Gilbert set to work on the new libretto by the early summer of 1889, and by the mid-summer Sullivan had started composing Act I. Gilbert provided Sullivan with alternative lyrics for many passages, allowing the composer to choose which ones he preferred. The long opening number (more than fifteen minutes of continuous music) was the librettist's idea, and it gave Sullivan the opportunity to establish the mood of the work through music. The costumes were designed by Percy Anderson and sets were by Hawes Craven, with choreography by Willie Warde.