improving anti_dos code a bit