He is perhaps best remembered as the librettist of "Bluebeard's Castle" which he originally wrote for his roommate Zoltán Kodály, who in turn introduced him to the eventual composer of the opera, Béla Bartók.