add TODO: pick the best joining algorithm based the sizeHint