declaring external variables used