Also, if you include emailcode (from the csv input) in the secs tuples, you don't need to recompute it with emailcode().