Minor Edits to Algorithm