add test cases to catch SUB bug