moved localvars to local module
moved vars to local module