Understanding the variables scope