Added loops and closures