changed the db and structure of files