changed the test cases to become more flexible