refactored database structure  and default initialisation