implement export function