add process module test
add more comment
refactor code