created draft: javascript variable scope