use vars passed in