refactor update_status