added debugmode