recursive flood fill algorith