adds flood fill functionality