implemented flood filling (depth first)