factor out join with action