changes in database.py