points generation function created