refactored extractVariables and added noProcess check