split out the code for one test step into a reuseable function so we can use it for many test steps