add debugging to db