Please reformat your code, to fix the indentation.
It's not obvious to me what your code does, too many if's and obscure variables.
Please reformat your code, to fix the indentation.
It's not obvious to me what your code does, too many if's and obscure variables.