Database functions added