A Implementation of PS CD Algorithm