refactor check_updates