These three lines seem common enough to warrant a helper