separate concerns in utility function