Added Dire's DB code