changed scope of variables to local