Edited Okasaki for readability