Updated Loops and Logic