STC algorithm implement