export functionality working