added some debug tools