modified to a spm module
add example