implemented auto attack