Add functions for databases
Functions cleanup