added algo2
added algo2
changed algo2, it doesnt work right
changed algo2, it doesnt work right still
added rearrange
redid rearrange