added enemy ai and losing tag