added battleEnd