added some debug functions

so far everything seems perfect