corrected export function