cleaned debug code and fixed indent