Extracted parsing resource variables to a separate method