battle refactor done