added functions to determine which variables and parameters were used