use correct method names and improve the debug output