Updating rate to be a double