add test cases, fix ellipse bug