adding db function
adding db function