removed tabs for spaces; removed global debug