rebasing with Couillard's stuff in master