refactored index joined