updates to readdb.py