Added an export functionality