re write parse and unittest. no testcase for drop_extra and drop_space