more test code
changing from upvar to passing var for now. there may be a slight performance hit. Passing initial test cases takes priority ie code stability.