changed to use test cases.