apply Gorry's edits