added some debug functions
off for 2night