code for extracting user status from csv files