Update on floodfill algorithm