Corrected variable name after refactor into seperate method