typo fixes + printf-debugging
things fixed, missing criterion allocated