Updated export function