start getVariables function