New file for database functions, one moved already in there