checkpoint: awkwardly share common code