22 get csv data

combine into single `if` statemen