tangcheng write this version , modify it ...