modification function of atack