Write the fill function, which works recursively into descendants