Implemented Algorithm - now in testing and debugging.