fix combine function and remove local variable
fix insert function