separate concerns as per @ChrisBeaumont's suggestion