Implemented an export function