Converted SCAN code to CSCAN.