example of use of arrays in external functions/subroutines