made export optional, also added options to include/exclude specific fields for export