realise and change the algorithm of TLD using C#