infrastructure for self-update