polished flood_fill and added tests