fellow gangsters. A technical consultant on the film was Tom Duffy, who had served three decades on the Boston Police Department, particularly as an undercover detective investigating the Irish mob. The Departed was officially greenlit by Warner Bros. in early 2005 and began shooting in the spring of 2005. Some of the film was shot on location in Boston. For budgetary and logistical reasons many scenes, in particular interiors, were shot in locations and sets in New York City, which had tax incentives for filmmakers that Boston at the time did not. Analysis Film critic Stanley Kauffmann said that for The Departed, Scorsese "was apparently concerned with the idea of identity, one of the ancient themes of drama, and how it affects one's actions, emotions, self-knowledge, even dreams." Kauffmann, however, did not find the theme conveyed with particular effectiveness in the film. Film critic Roger Ebert compared Costigan and Sullivan's seeking of approval from those they are deceiving to Stockholm syndrome. Ebert also noted the themes of Catholic guilt. In the final scene, a rat is seen on Sullivan's window ledge. Scorsese acknowledges that while it is not meant to be taken literally, it somewhat symbolizes the "quest for the rat" in the film and the strong sense of distrust among the characters, much like post-9/11 U.S. The window view behind the rat is a nod to gangster films like Little Caesar (1931), Scarface (1932), and White Heat (1949). Throughout the film, Scorsese uses an "X" motif to foreshadow death in a manner similar to Howard Hawks' film Scarface (1932). Examples include shots of cross-beam supports in an airport walkway when Costigan is phoning Sgt. Dignam, the lighted "X" on the wall in Sullivan's office when he assures Costello over the phone that Costigan is not the rat, the taped windows of the building Queenan enters before being thrown to his death, behind Costigan's head in the elevator before he is shot, and the carpeted hallway floor when Sullivan returns to his apartment before being shot by Dignam at the film's end. Jim Emerson, writing for RogerEbert.com, noted that Nicholson's character, and possibly Damon's, may be read as latently homosexual. He also notes that the inspiration for Nicholson's character, Bulger, was reportedly bisexual. Release The Departed grossed $132.4 million in the United States and Canada and $159 million in other territories for a total gross of $291.5 million, against a