This makes the code easier to reuse and uses the helper we just added. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>