half of merge and join done