working sql file, and updated layout