changed how you get sql, it is now coming from config file