reads the db