mostly rewritten loops for free, it Works