refactored out attack analysis