algo2: pep8 fixes
algo2: code separated by function
algo2: new stubs