Better export function