issue-6: move var creation above test