update some logic