consider a helper for this as well. It's only used twice, so you may not need to.