modify some logic