update some logic.