update build and add minor test cases