support multiple instances of variable in function