test cases made more dry