XFunction Control Points code