Changes to the export function