made some changes to the saveScore method to prevent out of bounds exeption