updated Variables and Closures in JS