If you're going to refactor anyways, it'd be good to implement the expect syntax here.