Ported 2 to 3.