fixed up and new sql files to hopefully make things work