he became treasurer of scotland in 1644, and in 1645 president of parliament. during the wars of the three kingdoms he played a complex role, but his position was basically a moderate presbyterian "engager" one. he fought for the army of the scots parliament at the battle of marston moor, and against the royalist general montrose at the battle of kilsyth, and was eventually captured by the english at alyth.