If you are worried about the subroutines accessing these variables, this is the way to avoid the problem; go for it! It is a good programming practice to have subroutines get all their input through the argument list and not through external variables, because it makes the code more maintainable.