updated SQL scripts