Repacked for simplicity.