 In August 1977, Märthesheimer and his partner Pea Fröhlich, a professor of psychology and pedagogics, were commissioned to write a screenplay based on the draft together.Although it was Märthesheimer's and Fröhlich's first screenplay their knowledge of Fassbinder's works allowed them to match the screenplay to the characteristic style and structure of Fassbinder's other works.Fassbinder changed only a few details in the completed screenplay, including some dialogue and the end of the film.