Little refacto on join