wrote in code to use attacks method, fixed an infinite loop bug in the while loop.