more playing around with scoping and globals