DB functions updates