'modernize' test code