Add hook to update loop