fix main of spm and update document