edits as suggested by James