Updating hook used for routing