finished modified rc3_database.py