adding export functionality