added set attakc function