modified update() function to take a string value rather than an int (so it can be used to update the name too); added code to the functions for updating the max value and the name