implementing export function