Created JS function that will update points