How does XP work?