fix up test code