provider modified for  joins query