avoid duplicate join
client side refactor