Converted control tags to loop and with