changed db code