updated readDB/ refactored all that