restructured the db