refactor attacker