Add utility function