update the scratch code
make some big amend

Signed-off-by: Levi Wang <wangli5665@gmail.com>