Code used in Test 1. provided as a convenience