moved sql to files