changed the debug api calls.