changed node searching algorithm (it searches the node with minimum area)