added join and index support