modified sql files for speed and dow