added some database python fuctions