added more logic to battle sys