skeleton of attacking alg