Complete iterative region grow function part. still have bugs.