should now work with new sql database