The code is no longer working from a csv file. It's all working off a postgres database.