Converted interactdb.py