fixed undefined test case problem.  still needs to be reviewed