compiled new version with Alex's CSV code