seem to have lost debug func, this adds it backwq