Code has algorithm problems and also it doesn't compile properly. Isolating but keeping available for future reference.