add test code & fix its bugs
0.0.2