added Algo Project 2 (original provided code)