restructured DB now working