completed export functionality