merging Andy's stuff