added DB code