factor out hint updating