the flood fill exercise as an example to recursion