added flood fill function