finish the basic process logic except a BUG.

Signed-off-by: Samuel Deng <mr.dengshuoling@gmail.com>