Merged with Laurens's version