Added a function to save the data on edit of scores