TSScan logic update