need to init the joinClause variable before we start appending to it I suppose