fix combine function