manually merged all final versions so far and works well