added vars subroutine