Update databaseFunctions.py

nearly done!