implemented double definition of variables