part done region growing
added regiongrowth code from web