some more modification of the debug version