add check flood function