test cases and factories modified