add maxhit to improve speed