updated export function