working on closures and loops