auto
fix combine function
modify combine again

better understanding on the algorithm
auto