db function additons