added function to export