battle api implemented