Factor out common code