merging Maire's work