added conditions before reloading table by search