fixed xp_compute