sepearte functions for two types of attacker