refactor csfp.ml
refactor codes