Add join logic