adding db code