Add updateData function
Add points update logic.