added sql setup;
amended