pre-production of the film took place in early 1997. stanton began writing the screenplay during the post-production of "a bug's life". as such, it began production with a complete screenplay, something that co-director lee unkrich called "very unusual for an animated film." the artists took scuba diving lessons so they could go and study the coral reef. the idea for the initiation sequence came from a story conference between andrew stanton and bob peterson while driving to record the actors. ellen degeneres was cast after stanton was watching "ellen" with his wife and seeing ellen "change the subject five times before finishing one sentence" as stanton recalled. there was a pelican character known as gerald (who in the final film ends up swallowing and choking on marlin and dory) who was originally a friend of nigel. they were going to play against each other as nigel being neat fastidious while gerald being scruffy and sloppy. however the filmmakers had not found an appropriate scene for them that didn't slow the pace of the picture down, so gerald's character was minimized.