read_db done. it remains to add verifications