add builder; fix testcases