refactor out the testcases to follow the usual layout