addeded xpcalculator function. calc xp