why does floodfill work but determineorder not