Updated logic to utilise data variable instead of hard-coded test string.