logic fix

--prevent iterations from completely enclosing other iterations
--dont mind the GIANT if