merge more of Lucians changes