ADDED DB FUNCTIONS