Alter algorithm again and document