added DbDetail to the rest of the code