added method for ending the battle