added debug code, to see if data are correctly fed in