changed TOPICS to a dict, updated sql file