edits from Chris Metcalf