Finish lab2

Signed-off-by: sunus <sunuslee@gmail.com>
add a debug function

Signed-off-by: sunus <sunuslee@gmail.com>