add test case, found some issue and fixed them.