tree data winner logic added