CSV-134: code refactor