use passed vars instead of vars stored