modified to spm module