update toggle archive and show_loading function