debug hooks added