parses a given csv