final versions of two papers