added addCase func.