upgraded getVar to allow default value and added getVars