fixed up database format