added debug endpoints for db