adding better attack logic