refacto plus new sql