add unittest, bugfix(WIP)
Rewrite parser