Added labels to the update function